<template>
	<view class="content">
		<Dynamic v-for="(item,index) in list" key="id"
			  :imgList="item.imgList"
			  :avatar="item.avatar"
		      :name="item.name"
		      :publishTime="item.publishTime"
		      :content="item.content"
		      :isLike="item.isLike"
		      :isGiveReward="item.isGiveReward"
		      :likeNumber="item.likeNumber"
		      :giveRewardNumber="item.giveRewardNumber"
		      :chatNumber="item.chatNumber"
		      @clickDynamic="clickDynamic(index)"
		      @clickUser="clickUser(item.id)"
		      @clickFocus="clickFocus(index)"
		      @clickThumbsup="clickThumbsup(item.id)"
		      @clickGiveReward="clickGiveReward(item.id)"
		      @clickChat="clickChat(item.id)">
		  </Dynamic>
	</view>
</template>

<script>
	import Dynamic from '../qizai-dynamic/Dynamic.vue'
	export default {
		name:"follow",
		components: {
		    Dynamic
		},
		data() {
		    return {
		        title: 'Hello',
		        list:[
		            {
		                id:1,
		                avatar:'https://dss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1950846641,3729028697&fm=26&gp=0.jpg',
		                name:'小新',
		                publishTime:1617086756,
		                content:'滇红工夫茶，属大叶种类型的工夫茶，是中国工夫红茶的新葩',
		                imgList:[
		                    'https://www.yinchaba.com/d/file/p/2020/08-11/b0ccec96e0f52a414443bf64352215d2.jpg',
		                    'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fcbu01.alicdn.com%2Fimg%2Fibank%2F2018%2F273%2F502%2F8832205372_1983980044.jpg&refer=http%3A%2F%2Fcbu01.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1627781368&t=86fd272ddb8b028ac04323e8c275f022',
		                ],
		                isLike:true,
		                isGiveReward:true,
		                likeNumber:2,
		                giveRewardNumber:2,
		                chatNumber:2,
		                isFocusOn:true,
		            },
		
		            {	id:2,
		                avatar:'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3717120934,3932520698&fm=26&gp=0.jpg',
		                name:'小龙马',
		                publishTime:1616086456,
		                content:'茶叶的种类有哪些,八大茶类你都知道吗?',
		                imgList:[
		                    'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_match%2F0%2F11955993823%2F0.jpg&refer=http%3A%2F%2Finews.gtimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1627782185&t=828195d599bf57c85214b16f5ee5d16f',
		                    'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.mingshantea.cn%2Fckfinder%2Fuserfiles%2Fimages%2F20130.jpg&refer=http%3A%2F%2Fwww.mingshantea.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1627782229&t=2abc956373e00509352ccd486935d6ea',
		                    'https://img2.baidu.com/it/u=2267235323,1174785729&fm=26&fmt=auto&gp=0.jpgb',
		                ],
		                isLike:true,
		                isGiveReward:false,
		                likeNumber:25,
		                giveRewardNumber:0,
		                chatNumber:7,
		            },
		            
		            {
		                id:3,
		                avatar:'https://dss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1950846641,3729028697&fm=26&gp=0.jpg',
		                name:'小新',
		                publishTime:1617046556,
		                content:' 如何打造茶叶品牌？因为我认为茶行业没有产品品牌，为什么？因为茶叶产品没有标准化，没有标准化就没有规模化，没有规模化就谈不上品牌化，这就是行业规律！',
		                imgList:[
		                    'https://www.puercn.com/uploadfile/202010/20201003102654162.jpg',
		                    'https://www.puercn.com/uploadfile/202010/20201003102706474.jpg',
		                    'https://www.puercn.com/uploadfile/202010/20201003102719740.jpg',
		                    'https://www.puercn.com/uploadfile/202010/20201003102730991.jpg',
		                    'https://www.puercn.com/uploadfile/202010/20201003102740422.jpg',
		                ],
		                isLike:true,
		                isGiveReward:false,
		                likeNumber:4,
		                giveRewardNumber:22,
		                chatNumber:52,
		            },
		            {
		                id:4,
		                    avatar:'https://dss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2291332875,175289127&fm=26&gp=0.jpg',
		                    name:'小白',
		                    publishTime:1617036656,
		                    content:'茶叶大数据，颠覆你的思想认识！',
		                    imgList:[
		                        'https://www.puercn.com/uploadfile/202009/20200928095430766.jpg',
		                    ],
		                    isLike:false,
		                    isGiveReward:false,
		                    likeNumber:0,
		                    giveRewardNumber:0,
		                    chatNumber:2,
		                    isFocusOn:false,
		                },
		            {
		                id:5,
		                avatar:'https://dss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2590128318,632998727&fm=26&gp=0.jpg',
		                name:'风清扬',
		                publishTime:1607086356,
		                content:'　普洱生茶主要可以清理肠道，降脂，提神，降压和减肥的功效。不过生茶活性成分较多，因此易失眠者、感冒发热者、胃溃疡患者、孕妇不宜饮用。',
		                imgList:[
		                    'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.mp.sohu.com%2Fq_mini%2Cc_zoom%2Cw_640%2Fupload%2F20170731%2F3a49a395fa9b427dac982d70b74066e2_th.jpg&refer=http%3A%2F%2Fimg.mp.sohu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1627783082&t=e36a3323bbe98905d5641a50b3f6b877',
		                    'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.bestb2b.com%2Fb1c4174d06410900e40f60d3248be19d.jpg&refer=http%3A%2F%2Fpic.bestb2b.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1627783114&t=8a2b63f17f94ed42187a11586b24af98',
		                    'https://gimg2.baidu.com/image_search/src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181012%2F9184e4e487e04f8eb3d57919177aa0c0.jpeg&refer=http%3A%2F%2F5b0988e595225.cdn.sohucs.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1627783138&t=433499fe768416bf9265aa5474df1dc9',
		                    'https://img2.baidu.com/it/u=2719484840,2402657935&fm=224&fmt=auto&gp=0.jpg',
		                ],
		                isLike:true,
		                isGiveReward:true,
		                likeNumber:3,
		                giveRewardNumber:2,
		                chatNumber:2,
		            }
		    ]
		    }
		},
		methods:{
		    clickDynamic(e){
		        console.log('childDynamic');
		    },
		    // 点击用户信息
		    clickUser(e){
		        console.log(e);
		        console.log('childUser');
		    },
		    // 点击关注
		    clickFocus(e){
		        this.list[e].isFocusOn = this.list[e].isFocusOn ? false : true;
		        console.log(e);
		        console.log('childUser');
		    },
		    // 点赞
		    clickThumbsup(e){
		        console.log(e);
		        console.log('childThumbsup');
		    },
		    // 点击打赏
		    clickGiveReward(e){
		        console.log(e);
		        console.log('clickGiveReward');
		    },
		    // 点击聊天
		    clickChat(e){
		        console.log(e);
		        console.log('clickChat');
		    }
		}
	}
</script>

<style>

</style>
